package org.carabiner.example;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;

public class AddSquareAction extends AbstractAction
{
  private View mainView;
  
  public AddSquareAction(View view)
  {    
    mainView = view;
    putValue(Action.NAME, "Square");
  }
  
  public void actionPerformed(ActionEvent e)
  {            
    mainView.addMouseListener(new SquareMouseController(mainView.getShapeModel()));   
  }
}
